/*
 * @Author: zhangweinan
 * @Date: 2023-07-17 14:27:07
 * @LastEditors: Hzt
 * @LastEditTime: 2025-05-28 17:39:40
 * @Description: file content
 * @FilePath: \cty_admin\src\api\system.js
 */
import { post, get } from "@/utils/request";

//保存公告
export function fetchSaveNotice(params) {
  return post("/notice/save", params);
}

//删除公告
export function fetchDeleteNotice(params) {
  return post(`/notice/delete?id=${params.id}`);
}

//上传图片
export function fetchUploadImage(params) {
  return post("/file/upload", params);
}

//首页统计信息
export function fetchHomeStatistics() {
  return get("/main/statistics");
}

//收益统计
export function fetchIncomeStatistics(params) {
  return post(`/purse/searchEarningsAggregate?sDate=${params.sDate}&eDate=${params.eDate}`);
}
//代理首页信息
export function getBusinessDataInfo() {
  return get(`/user-data/getBusinessDataInfo`);
}
//用户量价走势
export function getUserDailyQuantityLine() {
  return get(`/user-data/getUserDailyQuantityLine`);
}

export function uploadSingle(params) {
  return post("/file/uploadSingle", params);
}

export function policyEdit(params) {
  return post("/policy/edit", params);
}


export function policyDelete(id) {
  return post(`/policy/delete/${id}`);
}
